﻿/***********************************************
  [className] CPdfRptRestAiOperBase
  [func]      pdf报表AI检测
  [author]    WeiXiaoYu
  [date]      2025/02/06 13:00
  [log]       初次建立
[Modification Log]
Vers            By            Notes
************************************************/

#ifndef CPdfRptRestAiOperBase_H
#define CPdfRptRestAiOperBase_H

#include <QObject>
#include "CPdfRptTool.h"

class CAllPdfRptDataInfo;
struct SPdfSeSeSglAlmInfo;

class CPdfRptRestOper : public QObject
{
	Q_OBJECT

public:
	CPdfRptRestOper(CPdfRptTool *pPdfRptTool, QObject *parent = nullptr);
	~CPdfRptRestOper();

	/***************************************************************
	* @brief     函数功能:绘制声振温检测综述表格
	* @input     dStartRow|绘制起始行
	* @input     dStartCol|绘制起始列
	* @input     dataInfo|报表数据集合
	* @input     painter|QPainter对象
	* @input     printer|QPrinter对象
	* @output    sErrMsg|错误描述
	* @return    bool |成功返回true，失败返回false
	* @note
	* @author    WeiXiaoYu
	* @time      2025-02-19 13:30
	* @Modification Log]
	 Vers            By            Notes
	**************************************************************/
	virtual bool drawSeSeOverviewForm(double &dStartRow, double &dStartCol, CAllPdfRptDataInfo &dataInfo, QPainter &painter, QPrinter &printer, QString &sErrMsg);

	/***************************************************************
	* @brief     函数功能:绘制声振温所有报警详情
	* @input     dStartRow|绘制起始行
	* @input     dStartCol|绘制起始列
	* @input     dataInfo|报表数据集合
	* @input     painter|QPainter对象
	* @input     printer|QPrinter对象
	* @output    sErrMsg|错误描述
	* @return    bool |成功返回true，失败返回false
	* @note
	* @author    WeiXiaoYu
	* @time      2025-02-19 13:30
	* @Modification Log]
	 Vers            By            Notes
	**************************************************************/
	virtual bool drawSeSeAllAlmDes(double &dStartRow, double &dStartCol, CAllPdfRptDataInfo &dataInfo, QPainter &painter, QPrinter &printer, QString &sErrMsg);

	/***************************************************************
	* @brief     函数功能:绘制单个声振温报警详情(不包含表头)
	* @input     dStartRow|绘制起始行
	* @input     dStartCol|绘制起始列
	* @input     nAlmIdex|报警序号
	* @input     sglAlmInfo|声振温单个报警数据
	* @input     painter|QPainter对象
	* @input     printer|QPrinter对象
	* @output    sErrMsg|错误描述
	* @return    bool |成功返回true，失败返回false
	* @note
	* @author    WeiXiaoYu
	* @time      2025-02-19 13:30
	* @Modification Log]
	 Vers            By            Notes
	**************************************************************/
	virtual bool drawSeSeSingAlmDes(double &dStartRow, double &dStartCol, int nAlmIdex, SPdfSeSeSglAlmInfo &sglAlmInfo, QPainter &painter, QPrinter &printer, QString &sErrMsg);

	/***************************************************************
	* @brief     函数功能:绘制声振温报警详情的表头
	* @input     dStartRow|绘制起始行
	* @input     dStartCol|绘制起始列
	* @input     painter|QPainter对象
	* @input     printer|QPrinter对象
	* @output    sErrMsg|错误描述
	* @return    bool |成功返回true，失败返回false
	* @note
	* @author    WeiXiaoYu
	* @time      2025-02-19 13:30
	* @Modification Log]
	 Vers            By            Notes
	**************************************************************/
	virtual bool drawSeSeAlmDesHeader(double &dStartRow, double &dStartCol, QPainter &painter, QPrinter &printer, QString &sErrMsg);


private:
	CPdfRptTool *m_pPdfRptTool = nullptr;//工具类指针
	static bool compareByTime(SPdfSeSeSglAlmInfo& sglAlmInfoOne, SPdfSeSeSglAlmInfo& sglAlmInfoTwo);//按照时间比较
	void sortVectorByTime(QVector<SPdfSeSeSglAlmInfo>& vecData);//排序容器
};
#endif